
<a href="<?php echo $this->basePath('academico/frequencia/lancar'); ?>" class="btn btn-info" ><i class="glyphicon glyphicon-list-alt"></i> NOVA FREQUÊNCIA</a>

<br><br>

<!-- Nav tabs -->
<ul class="nav nav-tabs">
  <li class="active"><a href="#1" data-toggle="tab">1º BIMESTRE</a></li>
  <li><a href="#2" data-toggle="tab">2º BIMESTRE</a></li>
  <li><a href="#3" data-toggle="tab">3º BIMESTRE</a></li>
  <li><a href="#4" data-toggle="tab">4º BIMESTRE</a></li>
</ul>

<!-- Tab panes -->
<div class="tab-content">
    <div class="tab-pane active" id="1">
        <legend>FREQUÊNCIA 1º BIMESTRE</legend>
        <a class="btn btn-warning"><i class="glyphicon glyphicon-print"></i>  IMPRIMIR</a>
        <div class="form-group" id="1">
            <table class="table table-striped table-bordered table-condensed">
                <thead>
                    <tr>
                        <th width="20%" scope="col">Aluno</th>
                        <?php
                        foreach ($rsAulas as $aula) :
                            $aula = (object) $aula;
                            $data = new \DateTime($aula->dt_aula);
                        ?>
                        <th width="2%" scope="col">
                            <a href="<?php echo $this->basePath('academico/frequencia/lancar/aula/' . $aula->id_aula); ?>">
                            <?php echo $data->format('d/m'); ?>
                            </a>
                        </th>
                        <?php endforeach; ?>
                    </tr>
                </thead>
                <tbody>
                <?php foreach ($rsAlunos as $rAluno) : ?>
                    <tr>
                        <td><?php echo $rAluno->st_nome; ?></td>
                        <?php
                        foreach ($rsAulas as $aula) :
                            $aula = (object) $aula;
                        ?>
                        <td width="2%" scope="col">
                            <?php echo isset($aFrequencias[$aula->id_aula][$rAluno->id_aluno]) ? $aFrequencias[$aula->id_aula][$rAluno->id_aluno] : '-'; ?>
                        </td>
                        <?php endforeach; ?>
                    </tr>
                <?php endforeach; ?>
                </tbody>
            </table>
        </div>
    </div>

<div class="tab-pane " id="2">
    <legend>FREQUÊNCIA 2º BIMESTRE</legend>
    <a  class="btn btn-warning"><i class="glyphicon glyphicon-print"></i>  IMPRIMIR</a>
</div>

<div class="tab-pane " id="3">
    <legend>FREQUÊNCIA 3º BIMESTRE</legend>
    <a  class="btn btn-warning"><i class="glyphicon glyphicon-print"></i>  IMPRIMIR</a>
</div>

<div class="tab-pane " id="4">
    <legend>FREQUÊNCIA 4º BIMESTRE</legend>
    <a  class="btn btn-warning"><i class="glyphicon glyphicon-print"></i>  IMPRIMIR</a>
</div>
